import { Injectable, NotFoundException } from '@nestjs/common';
import { CreateTasksDto } from './dto/create-tasks.dto';
import { Task } from './entities/task.entity';
import { TasksRepository } from './tasks.repository';
import { UpdateTasksStatusDto } from './dto/update-tasks-status.dto';
import { GetTasksFilterDto } from './dto/get-tasks-filter.dto';
import { User } from '../../system/user/entities/user.entity';

@Injectable()
export class TasksService extends TasksRepository {
  getTasksList(filterDto: GetTasksFilterDto, user: User): Promise<Task[]> {
    return super.getTaskList(filterDto, user);
  }

  getTasksById(id: string, user: User): Promise<Task> {
    return super.getTaskById(id, user);
  }
  createTasks(createTasksDto: CreateTasksDto, user: User): Promise<Task> {
    return super.createTask(createTasksDto, user);
  }
  deleteTasks(id: string, user: User): Promise<void> {
    return super.deleteTask(id, user);
  }
  updateTasksStatus(
    updateTasksStatusDto: UpdateTasksStatusDto,
    user: User,
  ): Promise<Task> {
    return super.updateTask(updateTasksStatusDto, user);
  }
}
